<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>bootstrap 初体验</title>
    <link
      href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
      rel="stylesheet"
    />
  </head>
  <body>
    <button class="btn btn-primary" data-spy="affix" data-offset-top="150" >测试 affix</button>

    <div class="container">
      <h2>模态框</h2>
      <!-- Button trigger modal -->
      <button
        type="button"
        class="btn btn-primary btn-md"
        data-toggle="modal"
        data-target="#myModal"
      >
        提交
      </button>

      <!-- Modal -->
      <div
        class="modal fade"
        id="myModal"
        tabindex="-1"
        role="dialog"
        aria-labelledby="myModalLabel"
      >
        <div class="modal-dialog modal-sm" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <button
                type="button"
                class="close"
                data-dismiss="modal"
                aria-label="Close"
              >
                <span aria-hidden="true">&times;</span>
              </button>
              <h5 class="modal-title" id="myModalLabel">操作提醒</h5>
            </div>
            <div class="modal-body">您确定要提交当前内容么?</div>
            <div class="modal-footer">
              <button
                type="button"
                class="btn btn-default"
                data-dismiss="modal"
              >
                取消
              </button>
              <button type="button" class="btn btn-primary">确定</button>
            </div>
          </div>
        </div>
      </div>

      <h2>标签页</h2>
      <div class="bs-example bs-example-tabs" data-example-id="togglable-tabs">
        <ul id="myTabs" class="nav nav-tabs" role="tablist">
          <li role="presentation" class="active">
            <a
              href="#home"
              id="home-tab"
              role="tab"
              data-toggle="tab"
              aria-controls="home"
              aria-expanded="true"
              >公告</a
            >
          </li>
          <li role="presentation" class="">
            <a
              href="#profile"
              role="tab"
              id="profile-tab"
              data-toggle="tab"
              aria-controls="profile"
              aria-expanded="false"
              >活动</a
            >
          </li>
          <li role="presentation" class="dropdown">
            <a
              href="#"
              id="myTabDrop1"
              class="dropdown-toggle"
              data-toggle="dropdown"
              aria-controls="myTabDrop1-contents"
              >新闻 <span class="caret"></span
            ></a>
            <ul
              class="dropdown-menu"
              aria-labelledby="myTabDrop1"
              id="myTabDrop1-contents"
            >
              <li>
                <a
                  href="#dropdown1"
                  role="tab"
                  id="dropdown1-tab"
                  data-toggle="tab"
                  aria-controls="dropdown1"
                  >热门新闻</a
                >
              </li>
              <li>
                <a
                  href="#dropdown2"
                  role="tab"
                  id="dropdown2-tab"
                  data-toggle="tab"
                  aria-controls="dropdown2"
                  >国际新闻</a
                >
              </li>
            </ul>
          </li>
        </ul>
        <div id="myTabContent" class="tab-content">
          <div
            role="tabpanel"
            class="tab-pane fade active in"
            id="home"
            aria-labelledby="home-tab"
          >
            <p>000</p>
          </div>
          <div
            role="tabpanel"
            class="tab-pane fade"
            id="profile"
            aria-labelledby="profile-tab"
          >
            <p>1111</p>
          </div>
          <div
            role="tabpanel"
            class="tab-pane fade"
            id="dropdown1"
            aria-labelledby="dropdown1-tab"
          >
            <p>222</p>
          </div>
          <div
            role="tabpanel"
            class="tab-pane fade"
            id="dropdown2"
            aria-labelledby="dropdown2-tab"
          >
            <p>333</p>
          </div>
        </div>
      </div>

      <h2>工具提示</h2>
      <button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="left" title="Tooltip on left" >
        Tooltip on left
      </button>

      <button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Tooltip on top" >
        Tooltip on top
      </button>

      <button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom" >
        Tooltip on bottom
      </button>

      <button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="right" title="Tooltip on right" >
         Tooltip on right
      </button>

      <h2>警告框</h2>
      <div class="alert alert-warning alert-dismissible fade in" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
        <strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
      </div>

      <h2>手风琴效果</h2>
      <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
        <div class="panel panel-default">
          <div class="panel-heading" role="tab" id="headingOne">
            <h4 class="panel-title">
              <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                Collapsible Group Item #1
              </a>
            </h4>
          </div>
          <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
            <div class="panel-body">
              Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
            </div>
          </div>
        </div>
        <div class="panel panel-default">
          <div class="panel-heading" role="tab" id="headingTwo">
            <h4 class="panel-title">
              <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                Collapsible Group Item #2
              </a>
            </h4>
          </div>
          <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
            <div class="panel-body">
              Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
            </div>
          </div>
        </div>
        <div class="panel panel-default">
          <div class="panel-heading" role="tab" id="headingThree">
            <h4 class="panel-title">
              <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
                Collapsible Group Item #3
              </a>
            </h4>
          </div>
          <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
            <div class="panel-body">
              Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
            </div>
          </div>
        </div>
      </div>

      <h2>轮播图效果</h2>
      <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
        <!-- Indicators -->
        <ol class="carousel-indicators">
          <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
          <li data-target="#carousel-example-generic" data-slide-to="1"></li>
          <li data-target="#carousel-example-generic" data-slide-to="2"></li>
        </ol>
      
        <!-- Wrapper for slides -->
        <div class="carousel-inner" role="listbox">
          <div class="item active">
            <img src="holder.js/100px300?bg=#c89" alt="...">
            <div class="carousel-caption">
              ...
            </div>
          </div>
          <div class="item">
            <img src="holder.js/100px300?bg=#58c" alt="...">
            <div class="carousel-caption">
              ...
            </div>
          </div>
          <div class="item">
            <img src="holder.js/100px300?bg=#8c7" alt="...">
            <div class="carousel-caption">
              ...
            </div>
          </div>
        </div>
      
        <!-- Controls -->
        <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
          <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
          <span class="sr-only">Previous</span>
        </a>
        <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
          <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
          <span class="sr-only">Next</span>
        </a>
      </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/holder/2.9.8/holder.min.js"></script>

    <script>
      //$ 是一个全局变量
      $('[data-toggle="tooltip"]').tooltip();
    </script>
  </body>
</html>
